home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010306-20010921 / 000220_jgriess@caramail.com_Wed Jun 20 09:35:17 EDT 2001.msg < prev    next >
Text File  |  2020-01-01  |  4KB  |  105 lines

  1. Article: 12540 of comp.protocols.kermit.misc
  2. From: "jean-luc" <jgriess@caramail.com>
  3. Newsgroups: comp.protocols.kermit.misc
  4. References: <9ghrnm$m59$1@front1m.grolier.fr> <3b2dbe15$1_2@news.datacomm.ch> <9gl0kj$l64$1@newsmaster.cc.columbia.edu> <3b2f3dae$1_1@news.datacomm.ch> <9gnoob$kn6$1@newsmaster.cc.columbia.edu>
  5. Subject: Re: must write a soft including Kermit binary file send
  6. Date: Wed, 20 Jun 2001 13:34:52 +0200
  7. Lines: 86
  8. X-Priority: 3
  9. X-MSMail-Priority: Normal
  10. X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
  11. X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
  12. NNTP-Posting-Host: 212.254.64.64
  13. Message-ID: <3b308944_1@news.datacomm.ch>
  14. X-Trace: 20 Jun 2001 13:30:12 +0100, 212.254.64.64
  15. Organization: Customers of Tiscali DataComm AG - http://www.tiscali.ch/
  16. Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!solaris.cc.vt.edu!news.vt.edu!news.netins.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!nautilus.eusc.inter.net!newsfeed.Austria.EU.net!newsfeed.kpnqwest.at!newsmaster-01.atnet.at!atnet.at!news.datacomm.ch
  17. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12540
  18.  
  19. Thanks for the explanation,
  20. checksumm is ok now.
  21.  
  22. in fact, Labview is running on a PC, Win NT.
  23. It would be possible in  Labview to call Kermit application,
  24. but then how to make the binary file send happen
  25. without operator typing the commands ?
  26. Is this possible with arguments in the calling line ?
  27. ( This would avoid me to write the binary file send
  28. in Labview, emulating the Kermit packetting ).
  29.  
  30. Jean-Luc
  31.  
  32. Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote in message
  33. news:9gnoob$kn6$1@newsmaster.cc.columbia.edu...
  34. > In article <3b2f3dae$1_1@news.datacomm.ch>,
  35. > jean-luc <jgriess@caramail.com> wrote:
  36. > : please understand
  37. > : - The OS-9 stuf is given and working, also if it is a older Kermit
  38. version.
  39. > : - OS-9 is the target where "kermit ri" is waiting for files.
  40. > :
  41. > What kind of computer is sending the files?  Does it have an operating
  42. > system?
  43. >
  44. > : I was reading some of your source files, like ckcfn2.c and gkermit.c, so
  45. > : its a great help, know about S, F, D-type packets.
  46. > :
  47. > : The receiver OS-9 is waiting for files and send a NACK at regular
  48. > : intervalls
  49. > :
  50. > : NACK is 01 23 20 4E 33 0D
  51. > : where 01 is the start character
  52. > : where 23 20 is the sequence number
  53. > : where 4E ist the N for NACK
  54. > : where 0D is the block end
  55. > :
  56. > : what is the 33 for ?
  57. > : is this a checksumm ?
  58. > :
  59. > 01 = Ctrl-A  Start of packet
  60. > 23 = #       Length
  61. > 20 = SP      Sequence number
  62. > 4E = N       Type
  63. > 33 = 3       Checksum
  64. > 0D = CR      Terminator
  65. >
  66. > : I have problems with the checksumm calculation.
  67. > : I use the 1 Byte checksumm, type 1 so its all bytes anded with 177 and
  68. > : summed, add higher bits and anded with 77 I dont find that result.
  69. > :
  70. > Here's the formula from chk1() in ckcfn2.c:
  71. >
  72. >   chk = (((chk & 0300) >> 6) + chk) & 077;
  73. >
  74. > chk is the sum of the length, sequence, type, and data fields.  Before
  75. > application of the formula, this is:
  76. >
  77. >   23 + 20 + 4E = 91 (hex) = 221 (octal) = 145 (decimal)
  78. >
  79. > In C, the numbers starting with 0 are octal.  You could write this in
  80. > hexadecimal as:
  81. >
  82. >   chk = (((chk & 0xC0) >> 6) + chk) & 0x3F;
  83. >
  84. > and in decimal as:
  85. >
  86. >   chk = (((chk & 192) >> 6) + chk) & 63;
  87. >
  88. > Let's use hex, since that's what you used:
  89. >
  90. >   chk = (((chk & 0xC0) >> 6) + chk) & 0x3F;
  91. >   chk = (((0x91 & 0xC0) >> 6) + 0x91) & 0x3F;
  92. >   chk = ((0x80 >> 6) + 0x91) & 0x3F;
  93. >   chk = (0x02 + 0x91) & 0x3F
  94. >   chk = (0x93 & 0x3F)
  95. >   chk = 13
  96. >
  97. > Then to make it printable we add 20 (hex) = 33, which is ASCII "3".
  98. >
  99. > It's all in the book.  Maybe you can find a copy of it in your local
  100. > library.
  101. >
  102. > - Frank
  103.  
  104.  
  105.